import re

res = re.search("<b>(?P<val>.*?)</b>", "<b>加粗</b><b>加粗</b>")
print(res)
print(res.group("val"))